package firstping.spotcheck;

import java.io.IOException;

import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

@SuppressWarnings("serial")
public class SpotCheckCanadaServlet extends HttpServlet {
	public void doGet(HttpServletRequest req, HttpServletResponse resp)
			throws IOException {
		String name = req.getParameter("name");

		req.setAttribute("time", SpotCheck.Check(name, "http://67.205.109.33:8080/spotcheck/spot-check"));
		
		try {
			req.getRequestDispatcher("spot_check_time.jsp").forward(req,resp);
		} catch (Exception e) {
			// TODO: handle exception
		}
	}
}
